<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>demo</title>
	<style type="text/css">

		.box{
			width: 100px;
			height: 100px;
			background-color: pink;
		}
		.box .xbox{
			width: 50px;
			height: 50px;
			background-color: #ccc;
		}
		.d{
			width: 700px;
			height: 30px;
			background-color: #ccc;
		}
	</style>
	<script type="text/javascript">
		window.onload=function() {
			par=document.getElementsByClassName("box");
			uu=document.getElementById("u");
			xb=document.createElement("p");
			xr=document.createElement("p");
			xb.innerHTML="i am xinlaide";
			xr.innerHTML="i an houlaide";
			box=par[0].parentNode.firstChild.nextSibling.nextSibling;
			box.appendChild(xr);
			box.insertBefore(xb,uu)
			//alert(box);
		}
		

	</script>
</head>
<body><div>dddd</div><div class="box"><div class="xbox"></div></div><div class="d"><a id="u">aaaa</a>88888</div>
</body>
</html>